-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Move sponsorship from frontier #911
Conversation
@@ -121,3 +162,137 @@ where | |||
} | |||
} | |||
} | |||
|
|||
/// Bla bla bla Mr. Freeman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Видимо не хватает коммента.
// #[cfg(feature = "debug-logging")] | ||
// log::trace!(target: "sponsoring", "checking who will pay fee for {:?} {:?}", source, reason); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это надо либо раскоментить либо удалить.
origin: &T::CrossAccountId, | ||
) -> Result<CheckEvmTransaction<'a, E>, E> { | ||
let who = &v.who; | ||
let max_fee_per_gas = Some(v.transaction_fee_input()?.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может лучше не оборачивать в Option, чтобы потом не делать unwrap?
И оставить let (max_fee_per_gas, _) = self.transaction_fee_input()?;
как было.
) | ||
.as_ref() | ||
.map(pallet_evm::Pallet::<T>::account_basic_by_id) | ||
.map(|v| v.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Дело вкуса, но мне больше нравится .map(|(v, _)| v);
.map(|v| v.0); | ||
|
||
let fee = max_fee_per_gas.unwrap().saturating_mul(v.transaction.gas_limit); | ||
if let Some(sponsor) = sponsor.as_ref() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Проверка if self.config.is_transactional || fee > U256::zero() {
, которая есть в изначальном коде, здесь не нужна?
f0a75e4
to
02ae332
Compare
02ae332
to
84ba084
Compare
84ba084
to
257fe16
Compare
257fe16
to
1613a8e
Compare
1613a8e
to
4c3b709
Compare
4c3b709
to
78ef2a9
Compare
No description provided.